package cn.com.xy.sms.sdk.ui.web;

import java.util.Map;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.http.SslError;
import android.webkit.ConsoleMessage;
import android.webkit.JsResult;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.webkit.GeolocationPermissions.Callback;

public interface IActivityForWebView {
    public WebView getWebView();
    public Activity getActivity();
    public Intent getIntent();
    public int checkOrientation();

    public boolean shouldOverrideUrlLoading(WebView view, String url);
    public void onProgressChanged(WebView view, int newProgress);
    public void onPageStarted(WebView view, String url, Bitmap favicon);
    public void onPageFinished(WebView view, String url);
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl);
    public void showError(int errorCode, Map<String, Object> extend);
    public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype,
            long contentLength);
    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error);
    public void setEndUrl(String url);
    public void requestWebViewLoad(String pageViewUrl);
    public void requestWebViewLoad(String pageViewUrl,Map<String, String> header);
    public boolean onJsAlert(WebView view, String url, String message, JsResult result);
    public boolean onJsConfirm(WebView view, String url, String message, JsResult result);
    public boolean onConsoleMessage(ConsoleMessage cm);
    public void onGeolocationPermissionsShowPrompt(String origin, Callback callback);
    public void onConsoleMessage(String message, int lineNumber, String sourceID);
    public void onReceivedTitle(WebView view, String title);
    public void onSdkParamsInitfinish();
}
